<template>
  <div>
    <el-card class="box-card">
      <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="产品目录" name="fifth"><Product ref="product"></Product></el-tab-pane>
          <el-tab-pane label="报价管理" name="second"><Offer ref="offer"></Offer></el-tab-pane>
          <el-tab-pane label="订单管理" name="third"><Order ref="order"></Order></el-tab-pane>
          <el-tab-pane label="业绩查询" name="fourth"><Achievement ref="achievement"></Achievement></el-tab-pane>
         <!-- <el-tab-pane label="业务流程管理" name="first" ><Flow ref="flow"></Flow></el-tab-pane> -->
       </el-tabs>
    </el-card>

  </div>
</template>


<script>
  import Flow from './flow.vue'
	import Offer from './offer.vue'
	import Order from './order.vue'
	import Achievement from './achievement.vue'
	import Product from './product.vue'
	import Sales_DB from './sales_database.vue'
   export default {
      data() {
        return {
          activeName :"fifth"
         }
         },
         components: {
            Flow:Flow,
            Offer:Offer,
            Order:Order,
            Achievement:Achievement,
            Product:Product,
            Sales_DB:Sales_DB
         },
         methods: {
            handleClick(tab, event) {
              /* if(tab.label=='业务流程管理')
                  this.$refs.flow.getdata(); */
               if(tab.label=='报价管理')
                  this.$refs.offer.getdata();
                  if(tab.label=='订单管理'){
                    this.$refs.order.getdata();
                    /* this.$refs.order.getdata1(); */
                  }
                  this.$refs.order.getdata();
                  if(tab.label=='业绩查询')
                  this.$refs.achievement.getdata();
                  if(tab.label=='产品目录'){
                    this.$refs.product.getdata();
                  }

             }
           },
           }
</script>

<style>

</style>
